OLAP Versus OLTP
One of the primary goals of
OLAP is to increase data retrieval speed for business-related queries
that are critical to decisions. Very often, there is a need to broaden
the scope of a business query or to drill down into more granular
details of the query. OLAP was created to facilitate this type of
capability. A multidimensional schema is not a typical normalized
relational database; redundant data is stored to facilitate quick
retrieval. The data in a multidimensional database should be relatively
static; in fact, data is not useful for decision support if it changes
constantly. The information in a data warehouse is built out of
carefully chosen snapshots of business data from OLTP systems. If you
capture data at the right times for transfer to the data warehouse, you
can quickly make accurate comparisons of important business activities
over time.
In an OLTP system,
transaction speed is paramount. Data modification operations must be
quick, deal with concurrency (locking/holding of resources), and
provide transactional consistency. An OLTP system is constantly
changing; snapshots of the OLTP system, even if taken only a few
seconds apart, are all different. Although historical information is
certainly available in an OLTP system, using it for BI-type analysis
might be impractical. Storing old data in an OLTP system becomes
expensive, and you might need to reconstruct history dynamically from a
series of transactions. In addition, OLTP designs and indexes usually
don’t support large-scale decision support querying.
SSAS supports three OLAP
storage methods—MOLAP, ROLAP, and HOLAP—providing flexibility to the
data warehousing solution and enabling powerful partitioning and
aggregation optimization capabilities.
Figure 4
shows the MOLAP, HOLAP, and ROLAP storage continuum. MOLAP stores all
data locally (to SSAS), and ROLAP is the opposite (storing all data in
the relational database). MOLAP is by far the most often used storage
approach. The following sections take a closer look at them.
MOLAP
Multidimensional OLAP
(MOLAP) is an approach in which cubes are built directly from OLTP data
sources or from dimensional databases and downloaded to a persistent
store.
In SSAS, data is
downloaded to the server, and the details and aggregations are stored
in a native Microsoft OLAP format. No zero-activity records are stored.
The dimension keys in
the fact tables are compressed, and bitmap indexing is used. A
high-speed MOLAP query processor retrieves the data.
ROLAP
Relational OLAP (ROLAP) uses
fact data in summary tables in the OLTP data source to make data much
more current (real-time). The summary tables are populated by processes
in the OLTP system and are not downloaded to SSAS. The summary tables
are known as materialized views and contain various levels of
aggregation, depending on the options you select when building data
cubes with SSAS. SSAS builds the summary tables with a column for each
dimension and each measure. It indexes each dimension column and
creates an additional index on all the dimension columns.
HOLAP
SSAS implements a
combination of MOLAP and ROLAP called hybrid OLAP (HOLAP). Here, the
facts are left in the OLTP data source, and aggregations are stored in
the SSAS server. You use SSAS to boost query performance. This approach
helps avoid data duplication, but performance suffers a bit when you
query fact data in the OLTP summary tables. The amount of performance
degradation depends on the level of aggregation selected.
ROLAP and HOLAP are useful
in situations in which an organization wants to leverage its investment
in relational database technology and existing infrastructure. The
summary tables of facts are also accessible in the OLTP system via
normal data access methods. However, when you are using SSAS, both
ROLAP and HOLAP require more storage space because they don’t use the
storage optimizations of the pure MOLAP-compressed implementation.